import Vue from 'vue'
import Router from 'vue-router'
import User from '../views/User.vue'
import Login from '../views/Login.vue'
import UserRegister from '../views/UserRegister.vue'
import MerchantRegister from '../views/MerchantRegister.vue'
import Collect from '../views/Collect.vue'
import shopCart from '../views/ShopCart.vue'
import Order from '../views/Order.vue'
import UserManagement from '../views/UserManagement.vue'
import ShoesManagement from '../views/ShoesManagement.vue'
import OrderManagement from '../views/OrderManagement.vue'
import ShoesAdd from '../views/ShoesAdd.vue'
import ShoesDetail from '../views/ShoesDetali.vue'
import Persion from '../views/Persion.vue'
import shoesOrder from '../views/shoesOrder.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    { 
      path:'/', 
      component: User 
    },
    { 
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/user',
      name: 'user',
      component: User
    },
    {
      path: '/user/shopCart',
      name: 'shopCart',
      component: shopCart
    },
    {
      path: '/user/Collect',
      name: 'collect',
      meta: {
          auth: true
      },
      component: Collect
    },
    {
      path: '/user/order',
      name: 'order',
      meta: {
          auth: true
      },
      component: Order
    },
    {
      path: '/user/shoesOrder',
      name: 'shoesOrder',
      meta: {
          auth: true
      },
      component: shoesOrder
    },
    {
      path: '/userRegister',
      name: 'userRegister',
      component: UserRegister
    },
    {
      path: '/user/merchantRegister',
      name: 'merchantRegister',
      component: MerchantRegister
    },
    {
      path: '/admin/userManagement',
      name: 'userManagement',
      component: UserManagement
    },
    {
      path: '/admin/ShoesManagement',
      name: 'ShoesManagement',
      component: ShoesManagement
    },
    {
      path: '/user/ShoesManagement',
      name: 'ShoesManagement',
      component: ShoesManagement
    },
    {
      path: '/admin/orderManagement',
      name: 'orderManagement',
      component: OrderManagement
    },
    {
      path: '/user/ShoesAdd',
      name: 'ShoesAdd',
      component: ShoesAdd
    },
    {
      path: '/ShoesDetail',
      name: 'ShoesDetail',
      component: ShoesDetail
    },
    {
      path: '/user/persion',
      name: 'persion',
      component: Persion
    },
  ]
})
